from src.game.buff import Buff

class SpeedBuff(Buff):
    
    name = "speed"
    
    def __init__(self):
        Buff.__init__(self)
        self.motion = 30
        self.lifetime = 100
        
    def doEffect(self):
        if self.entity.motionX - self.motion >= 0:
            self.entity.motionX -= self.motion
        if self.entity.motionX + self.motion <= 0:
            self.entity.motionX += self.motion
        if self.entity.motionY - self.motion >= 0:
            self.entity.motionY -= self.motion
        if self.entity.motionY + self.motion <= 0:
            self.entity.motionY += self.motion
            